<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-queryLog">
			<div class="form-group">	
				<label class="col-sm-3 control-label">查询时间：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control time-input" id="queryDate" placeholder="查询时间" name="queryDate" th:value="${defaultDate}"/>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">客户端：</label>
				<div class="col-sm-8">
					<select id="clientIp" name="clientIp" class="form-control m-b" th:with="type=${clientList}">
	                    <option th:each="client : ${type}" th:text="${client.clientIp}" th:value="${client.clientIp}"></option>
	                </select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">日志级别：</label>
				<div class="col-sm-8">
				  <div class="radio-box">
					<input type="radio" id="logLevel" name="logLevel" th:value="ERROR" th:checked="true">
					<label style="color:#DC143C" th:text="异常"></label>
				  </div>
				  <div class="radio-box">
				  	<input type="radio" id="logLevel" name="logLevel" th:value="WARN">
					<label style="color:#FF8C00" th:text="警告"></label>
				  </div>
				  <div class="radio-box">
				  	<input type="radio" id="logLevel" name="logLevel" th:value="INFO">
					<label style="color:#1E90FF" th:text="全部"></label>
				  </div>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "testexecution/taskScheduling"
		$("#form-queryLog").validate({
			rules:{
				queryDate:{
					required:true,
				},
				clientIp:{
					required:true,
				}
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            var queryLog=$('#form-queryLog').serialize();
 	        	var url = prefix+"/downloadLog.do?"+queryLog;
	        	$.modal.openViewFull("客户端日志", url, null, null);
	        }
	    }
	</script>
</body>
</html>
